<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\Pivot;

class ChapterRepository extends Pivot
{
    const STATUS_UNUSED = 0;

    const STATUS_USING = 1;

    const STATUS_PULL_REQUEST = 2;

    const STATUS_PULL_REQUEST_REJECTED = 3;

    public function scopeSequence($query, $sequence)
    {
        return $query->wherePivot('sequence', $sequence);
    }
}
